package com.asiainfo.argumentResolver;

import com.asiainfo.annotation.Service;

import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.lang.reflect.Method;

@Service("argumentResolverResponseImpl")
public class ArgumentResolverResponseImpl implements IArgumentResolver {
    @Override
    public boolean support(Class<?> type, int paramIndex, Method method)
    {
        return ServletResponse.class.isAssignableFrom(type);
    }

    @Override
    public Object argumentResolver(HttpServletRequest request, HttpServletResponse response, Class<?> type, int paramIndex, Method method)
    {
        return response;
    }
}
